<?php
        //delete function (script)
        
        if(isset($_POST['delete'])){
            for($i=0;$i<$totalRows_notes;$i++){
                $delete = $_REQUEST['delete'];
                $checkbox = $_REQUEST['checkbox'];
                $count = count($_REQUEST['checkbox']);
                $delete_result_num = $chekbox[$i];
                //below is the sqlscript to the database.
                $sql_query = "UPDATE issuenotes SET deleted WHERE issueid = $delete_result_num";
                $result = mysql_query($sql_query);
                //java pop up menu.
                echo '<script>';
                echo 'alert("Data has been deleted!")';
                echo '</script>';
            }
        }
?>